package com.runachina.application;

import android.app.Application;

import cn.bmob.v3.Bmob;
import cn.bmob.v3.BmobConfig;

/**
 * Created by lyl on 2017/6/28.
 */

public class MyApplication extends Application {
    public static Application singleton;

    public static Application getInstance() {
        return singleton;
    }
    @Override
    public void onCreate() {
        super.onCreate();
        singleton = this;
        //初始化leak工具  不用的话 直接注释掉即可
       // LeakCanary.install(this);
    }
    /**
     * 初始化bmob
     */
    public void initBomb() {
        BmobConfig config = new BmobConfig.Builder(this)
                .setApplicationId("7bdeccd4c1f11ee2cedae7ba4fe76ce1")
                .setConnectTimeout(10)
                .build();
        Bmob.initialize(config);
    }
}
